const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
    mode:'development',
    entry:'./src/index.js',
    output:{
        // publicPath:'www',
        path: path.resolve(__dirname,'dist'),
        filename:'bundle.js'
    },
    devServer:{
        port:8080,
        static:'./dist'
        // contentBase:'./public'
    },
    plugins: [
        new CleanWebpackPlugin(),
        new HtmlWebpackPlugin({ template: './public/index.html' }),
      ]
}